<!--人才库添加-->
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!-- 导入头部top文件 start -->
<%@include file="../common/header.jsp" %>
<body>
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox-title">
                <h5>人才库信息</h5>
            </div>
            <div class="ibox-content ">
                <ul class="nav nav-tabs">
                    <li class="active"><a data-toggle="tab" href="#tab-1"> 基本信息</a>
                    </li>
                    <li class=""><a data-toggle="tab" href="#tab-2">教育信息</a>
                    </li>
                    <li class=""><a data-toggle="tab" href="#tab-3">工作经历信息</a>
                    </li>
                    <li class=""><a data-toggle="tab" href="#tab-4">自我描述</a>
                    </li>
                </ul>
                <div class="tab-content" style="margin-top: 10px;">
                    <div id="tab-1" class="tab-pane fade in active">
                        <form class="form-horizontal m-t" id="mainForm" method="post">
                            <input type="hidden" id="id" name="id" value="${model.id}"/>

                            <div class="form-group">
                                <label class="col-sm-3 control-label">姓名：*</label>

                                <div class="col-sm-8">
                                    <input id="name" name="name" type="text" value="${model.name}" class="form-control"
                                           required="" aria-required="true">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">性别：</label>

                                <div class="col-sm-8">
                                    <select id="sex" name="sex">
                                        <option value="1">男
                                        </option>
                                        <option value="2">女
                                        </option>
                                    </select>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-3 control-label">身份证：</label>

                                <div class="col-sm-8">
                                    <input id="shenfen" name="shenfen" type="text" value="${model.shenfen}"
                                           class="form-control"
                                    >
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">最高学历：</label>

                                <div class="col-sm-8">
                                    <input id="education" name="education" type="hidden" value="${model.education}"
                                           class="form-control"
                                    >
                                    <input id="educationName" name="educationName" type="text"
                                           value="${model.educationName}" class="form-control"
                                    >
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">工作年限：</label>

                                <div class="col-sm-8">
                                    <input id="workExperience" name="workExperience" type="text"
                                           value="${model.workExperience}" class="form-control"
                                    >
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">所在城市：</label>

                                <div class="col-sm-8">
                                    <input id="city" name="city" type="hidden" value="${model.city}"
                                           class="form-control"
                                    >
                                    <input id="cityName" name="cityName" type="text" value="${model.cityName}"
                                           class="form-control"
                                    >
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">手机号码：</label>

                                <div class="col-sm-8">
                                    <input id="mobile" name="mobile" type="text" value="${model.mobile}"
                                           class="form-control"
                                    >
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">联系邮箱：</label>

                                <div class="col-sm-8">
                                    <input id="email" name="email" type="text" value="${model.email}"
                                           class="form-control"
                                    >
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">简历状态：</label>

                                <div class="col-sm-8">
                                    <select id="status" name="status">
                                        <option value="1">无效
                                        </option>
                                        <option value="2">启用
                                        </option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">一句话介绍：</label>

                                <div class="col-sm-8">
                            <textarea id="intro" name="intro" type="text" value="${model.intro}" class="form-control"
                            >${model.intro}</textarea>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-4 col-sm-offset-3">
                                    <button class="btn btn-primary" type="submit" id="idSubmit">提交</button>
                                </div>
                            </div>
                        </form>
                    </div>
                    <div id="tab-2" class="tab-pane">
                        <div class="list-view" id="eListview">
                        </div>
                    </div>

                    <div id="tab-3" class="tab-pane">
                        <div class="list-view" id="wListview">
                        </div>
                    </div>
                    <div id="tab-4" class="tab-pane">
                        <div class="list-view" id="pListview">
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="/static/js/jquery.min.js?v=2.1.4"></script>
<script src="/static/js/bootstrap.min.js?v=3.3.5"></script>
<script src="/static/js/content.min.js?v=1.0.0"></script>
<script src="/static/js/plugins/validate/jquery.validate.min.js"></script>
<script src="/static/js/plugins/validate/messages_zh.min.js"></script>
<script src="/static/js/plugins/dialog/dialog-min.js"></script>
<script src="/static/js/plugins/dialog/dialog-plus-min.js"></script>
<script src="/static/js/listview.js?v=1.0.0"></script>
<script src="/static/js/admin/resumeAdd.js"></script>
<script src="/static/js/cateDialog.js"></script>
<script type="text/javascript">
    var id = "${model.id}";
    var status = "${status}";
    var from = mainForm;
    (function () {
        var param = "${model.id}";
        var el = $("#eListview").listview({
            url: "/resume/education/experience/json?resumeId=" + param,
            editUrl: "/resume/education/experience/edit",
            deleteUrl: "/resume/education/experience/delete",
            toolsbarButtons: {
                "添加": function () {
                    var url = "/resume/education/experience/save?resumeId=" + param;
                    var d = dialog({
                        id: "dialog",
                        title: "教育经验",
                        url: "/resume/education/experience/dialog",
                        ok: function () {
                            var iframeWin = this.iframeNode.contentWindow;
                            iframeWin.addResume(url, el, this);
                            return false;
                        },
                        width: 520
                    }).show();
                }
            },
            showTools: true,
            editStatus: true,
            showView: false,
            showDelete: true,
            fieldInfo: [
                {"field": "no", "title": "序号"},
                {"field": "resumeName", "title": "姓名"},
                {"field": "name", "title": "学校名称"},
                {"field": "major", "title": "所学专业"},
                {"field": "educationName", "title": "学历"},
                {"field": "startDate", "title": "毕业时间"},
                {"field": "createDate", "title": "创建时间"},
                {"field": "creatorName", "title": "创建人"},
            ]
        });
        var wl = $("#wListview").listview({
            url: "/resume/work/experience/json?resumeId=" + param,
            editUrl: "/resume/work/experience/edit",
            deleteUrl: "/resume/work/experience/delete",
            toolsbarButtons: {
                "添加": function () {
                    var url = "/resume/work/experience/save?resumeId=" + param;
                    var d = dialog({
                        id: "dialog",
                        title: "工作经验",
                        url: "/resume/work/experience/dialog",
                        ok: function () {
                            var iframeWin = this.iframeNode.contentWindow;
                            iframeWin.addResume(url, wl, this);
                            return false;
                        },
                        width: 520
                    }).show();
                }
            },
            showTools: true,
            editStatus: true,
            showView: false,
            showDelete: true,
            fieldInfo: [
                {"field": "no", "title": "序号"},
                {"field": "resumeName", "title": "姓名"},
                {"field": "name", "title": "公司名称"},
                {"field": "jobName", "title": "职位"},
                {"field": "logo", "title": "公司logo", "type": "img"},
                {"field": "startDate", "title": "在职开始时间"},
                {"field": "endDate", "title": "在职结束时间"},
                {"field": "createDate", "title": "创建时间"},
                {"field": "creatorName", "title": "创建人"},
            ]
        });
        var pl = $("#pListview").listview({
            url: "/resume/person/description/json?resumeId=" + param,
            editUrl: "/resume/person/description/edit",
            deleteUrl: "/resume/person/description/delete",
            toolsbarButtons: {
                "添加": function () {
                    var url = "/resume/person/description/save?resumeId=" + param;
                    var d = dialog({
                        id: "dialog",
                        title: "自我描述",
                        url: "/resume/person/description/dialog",
                        ok: function () {
                            var iframeWin = this.iframeNode.contentWindow;
                            iframeWin.addResume(url, pl, this);
                            return false;
                        },
                        width: 520
                    }).show();
                }
            },
            showTools: true,
            editStatus: true,
            showView: false,
            showDelete: true,
            fieldInfo: [
                {"field": "no", "title": "序号"},
                {"field": "resumeName", "title": "姓名"},
                {"field": "createDate", "title": "创建时间"},
                {"field": "creatorName", "title": "创建人"},
            ]
        });
    })(jQuery);
    $("#cityName").click(function () {
        var d = dialog({
            id: "dialog",
            title: '选择城市',
            url: '/user/company/address/dialog',
            ok: function () {
                var iframeWin = this.iframeNode.contentWindow;
                from.city.value = iframeWin.selectId;
                from.cityName.value = iframeWin.selectName;
            },
            width: 520,
            height: 200
        }).show();
    })
</script>
<script src="/static/js/admin/resumeInfo.js"></script>
</body>
</html>
